package com.example.education.service;

import com.example.education.exception.ParamException;
import com.example.education.model.Category;

import java.util.List;

/**
 * 种类管理模块：提供对资源种类的添加，删除，修改，查询的接口。
 */
public interface CategoryService {

    /**
     * 添加种类
     * @param category
     * @return
     */
    boolean insertCategory(Category category) throws ParamException;

    /**
     * 删除种类
     * @param categoryId
     * @return
     */
    boolean deleteCategory(Integer categoryId) throws ParamException;

    /**
     * 更新种类
     * @param category
     * @return
     */
    boolean updateCategory(Category category) throws ParamException;

    /**
     * 查询种类
     * @param categoryId
     * @return
     */
    Category getCategoryById(Integer categoryId) throws ParamException;

    /**
     * 查询所有
     * @return
     */
    List<Category> selectAll();

}
